CBMLINK(1)                                                          CBMLINK(1)



NAME
       cbmlink - Remote control and data transfers for Commodore 8-bit comput-
       ers

SYNOPSIS
       cbmlink -c protocol device [options]

DESCRIPTION
       This manual page documents briefly the cbmlink command.

       cbmlink implements data communications between an 8-bit Commodore  com-
       puter  and  another  computer  system.  Once a small server process has
       been loaded and started in the Commodore,  cbmlink  can  transfer  data
       between the system where it is run and the Commodore.  On the Commodore
       side, cbmlink can access main memory, files and entire  disks.   Access
       to files and disks is implemented by downloading and invoking an exten-
       sion program on the Commodore.


OPTIONS
       CBMLINK follows the usual Unix command line syntax, with options start-
       ing with a dash (`-').

       -b bank
              Specify  the  memory  bank  for -s and -l memory transfers.  The
              default is 1 for  the  Commodore  B  series  (the  600  and  700
              series),  and  0  for all other Commodores.  On a Commodore 128,
              banks 0-3 are for MMU-based memory access, and  banks  4-15  are
              for the PIA-based internal memory extension.  Banks 16-255 refer
              to the first 15,360 kilobytes of a Commodore RAM Expansion Unit.

       -c protocol device
              Specify  the  protocol and the interface name used for accessing
              the Commodore.  For a C2N232  device  connection,  you  may  use
              something  like  -c c2n232 /dev/ttyS0.  For a null modem connec-
              tion, also the default bit rate of 19200 can be  overridden:  -c
              serial  38400,/dev/ttyS0.   A  PC64 cable connected to the first
              parallel port of a PC compatible can be  accessed  via  -c  pc64
              0x3bc.

       -d drive[,secondary]
              Specify  the  device number for remote file and disk operations,
              and secondary address for remote file operations.   The  default
              device  number  is 8, and the default secondary address is 0 for
              -fr and 1 for -fw.

       -dc command
              Execute a disk drive command and read the drive status.   Beware
              that the UJ (reset) command may lock up the communications.

       -dd pattern
              Fetch the disk directory by reading a remote file $pattern.  The
              output is partially translated from PETSCII to  ASCII.   To  get
              the raw directory, type -fr '$pattern'.

       -dmc,address1,address2 file.prg
              Save the memory bytes from address1 up to but excluding address2
              in a dual disk drive's controller address  space  to  a  program
              file.   Write address1 to the first two bytes of the file.  Note
              that the drive may act strangely  once  this  command  has  been
              issued.

       -dmco,address1,address2 file.bin
              Save the memory bytes from address1 up to but excluding address2
              in a dual disk drive's controller  address  space  to  a  binary
              file.   Note  that the drive may act strangely once this command
              has been issued.

       -dml file.prg
              Load a program at its specified absolute  address  in  the  disk
              drive's  main  address  space.   The first two bytes of the file
              indicate the 16-bit  loading  address  (least  significant  byte
              first),  and the remaining bytes contain the file data.  At most
              64 kilobytes can be transferred at a time.

       -dmlo,address file.bin
              Load a binary file (not containing a starting  address)  to  the
              specified address in the disk drive's main address space.

       -dmlr,address file.prg
              Load  a  program,  ignoring  its address bytes, to the specified
              address in the disk drive's main address space.

       -dms,address,address file.prg
              Save the memory bytes from address1 up to but excluding address2
              in the disk drive's main address space to a program file.  Write
              address1 to the first two bytes of the file.

       -dmso,address,address file.bin
              Save the memory bytes from address1 up to but excluding address2
              in the disk drive's main address space to a binary file.

       -dr[0|1][,interleave[,start[,end]]] file
              Read  a disk in unit 0 (default) or 1 to an image file.  Option-
              ally, an interleave factor (number of sectors to  skip)  may  be
              specified  to  improve the transfer speed.  When it differs from
              0, file must be seekable.  The default is 10.  Also, the default
              start and end tracks of 1 and 1000 can be overridden.

       -ds    Query the disk drive status.

       -dw[0|1][,interleave[,start[,end]]] file
              Write an image file to a disk in unit 0 (default) or 1, starting
              from track 1, sector 0.  If the file is shorter than the  capac-
              ity  of  the  disk,  the  rest  of the disk will be left intact.
              Optionally, an interleave factor (number of sectors to skip) may
              be  specified  to  improve  the transfer speed.  When it differs
              from 0, file must be seekable.  The default is  10.   Also,  the
              default start and end tracks of 1 and 1000 can be overridden.

       -fr file...
              Copy  the  specified  files from the Commodore to the local file
              system.  As the file names are not  translated  between  PETSCII
              and  ASCII, it is best to use upper-case file names on the local
              system, which correspond to lower-case Commodore file names.

       -fw file...
              Copy the specified files from the local file system to the  Com-
              modore.   As  the  file names are not translated between PETSCII
              and ASCII, it is best to use upper-case file names on the  local
              system, which correspond to lower-case Commodore file names.

       -qf name,id
              Quick format a Commodore 1541 disk.

       -qr file
              Read  a  1541 disk to an image file.  The interleave is adjusted
              dynamically.

       -qw[,interleave] file
              Write a seekable image file to a 1541 disk, starting from  track
              1,  sector  0.   If the file is shorter than the capacity of the
              disk, the rest of the disk will be left intact.  Optionally,  an
              interleave  factor  (number of sectors to skip) may be specified
              to improve the transfer speed.

       -l[p] file.prg
              Load a program at its specified absolute address.  The first two
              bytes  of  the  file  indicate the 16-bit loading address (least
              significant byte first), and the  remaining  bytes  contain  the
              file  data.   At most 64 kilobytes can be transferred at a time.
              The options beginning with -lp support the P00  file  format  by
              skipping the 26-byte file header.

       -l[p]b file.prg
              Load a program, relocated to the start of the BASIC text area.

       -l[p]o,address file.bin
              Load  a  binary  file (not containing a starting address) to the
              specified address.

       -l[p]r,address file.prg
              Load a program, ignoring its address  bytes,  to  the  specified
              address.

       -s,address1,address2 file.prg
              Save the memory bytes from address1 up to but excluding address2
              in the specified bank to a program file.  Write address1 to  the
              first two bytes of the file.

       -so,address1,address2 file.bin
              Save the memory bytes from address1 up to but excluding address2
              in the specified bank to a binary file.

       -r     Disable the remote server and perform a RUN command in order  to
              start a BASIC program.

       -j,address
              Disable  the  remote server and jump to the specified address in
              order to start a machine language program.

       -jc,address
              Disable the remote server on a  Commodore  VIC-20  or  VIC-1001,
              install  some code at address and invoke an auto-start cartridge
              that has been loaded previously with one or more -l switches.

BUGS
       On the Commodore VIC-20, the keyboard  is  connected  to  the  cassette
       write  line.  When using the C2N232 device on this computer, it is bet-
       ter not to not touch the keyboard during data transfers.

       On the Commodore 64, the Action Replay  cartridge  may  cause  problems
       with some cables.

       Other cables than c2n232, serial, pc64 and kontros have not been tested
       with this release.

AUTHOR
       The cbmlink utility and the C2N232 cassette drive emulator device  were
       designed and implemented by Marko Mkel <msmakela@nic.funet.fi>.  Some
       of cbmlink is based on prlink, which was designed  and  implemented  by
       Marko  Mkel  and  Olaf Seibert.  The quick disk routines are based on
       the work of Daniel Kahlin and Andreas "pitch" Andersson.

SEE ALSO
       c2n(1), cbmconvert(1).



                                  May 5, 2002                       CBMLINK(1)
